home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / diff3.man < prev    next >
Encoding:
Text File  |  1989-01-07  |  3.0 KB  |  133 lines

  1.  
  2.  
  3.  
  4. DIFF3                     User Commands                     DIFF3
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      diff3 - 3-way differential file comparison
  10.  
  11. SSYYNNOOPPSSIISS
  12.      ddiiffff33 [ --eexxEEXX33 ] file1 file2 file3
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.      _D_i_f_f_3 compares three versions of a file, and publishes
  16.      disagreeing ranges of text flagged with these codes:
  17.  
  18.      ====            all three files differ
  19.  
  20.      ====1           _f_i_l_e_1 is different
  21.  
  22.      ====2           _f_i_l_e_2 is different
  23.  
  24.      ====3           _f_i_l_e_3 is different
  25.  
  26.      The type of change suffered in converting a given range of a
  27.      given file to some other is indicated in one of these ways:
  28.  
  29.      _f :: _n_1 aa        Text is to be appended after line number _n_1
  30.                      in file _f, where _f = 1, 2, or 3.
  31.  
  32.      _f :: _n_1 ,, _n_2 cc   Text is to be changed in the range line _n_1
  33.                      to line _n_2.  If _n_1 = _n_2, the range may be
  34.                      abbreviated to _n_1.
  35.  
  36.      The original contents of the range follows immediately after
  37.      a cc indication.  When the contents of two files are identi-
  38.      cal, the contents of the lower-numbered file is suppressed.
  39.  
  40.      Under the --ee option, _d_i_f_f_3 publishes a script for the editor
  41.      _e_d that will incorporate into _f_i_l_e_1 all changes between
  42.      _f_i_l_e_2 and _f_i_l_e_3, _i._e.  the changes that normally would be
  43.      flagged ==== and ====3.  Option --xx (--33) produces a script to
  44.      incorporate only changes flagged ==== (====3).  The follow-
  45.      ing command will apply the resulting script to `file1'.
  46.  
  47.                 (cat script; echo '1,$p') | ed - file1
  48.  
  49.      The --EE and --XX are similar to --ee and --xx, respectively, but
  50.      treat overlapping changes (i.e., changes that would be
  51.      flagged with ==== in the normal listing) differently.  The
  52.      overlapping lines from both files will be inserted by the
  53.      edit script, bracketed by "<<<<<<" and ">>>>>>" lines.
  54.  
  55.      For example, suppose lines 7-8 are changed in both file1 and
  56.      file2.  Applying the edit script generated by the command
  57.                     "diff3 -E file1 file2 file3"
  58.      to file1 results in the file:
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0              August 20, 1985                        1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DIFF3                     User Commands                     DIFF3
  71.  
  72.  
  73.  
  74.           lines 1-6
  75.           of file1
  76.           <<<<<<< file1
  77.           lines 7-8
  78.           of file1
  79.           =======
  80.           lines 7-8
  81.           of file3
  82.           >>>>>>> file3
  83.           rest of file1
  84.  
  85.      The --EE option is used by RCS _m_e_r_g_e(1) to insure that over-
  86.      lapping changes in the merged files are preserved and
  87.      brought to someone's attention.
  88.  
  89. FFIILLEESS
  90.      /tmp/d3?????
  91.      /usr/lib/diff3
  92.  
  93. SSEEEE AALLSSOO
  94.      diff(1)
  95.  
  96. BBUUGGSS
  97.      Text lines that consist of a single `.' will defeat --ee..
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sprite v1.0              August 20, 1985                        2
  130.  
  131.  
  132.  
  133.